
#include <filesystem>
#include <vector>
#include <string>
#include <iostream>

#include "BuildTool.h"

int main( int argc, char* argv[] )
{
    if(argc<2)
    {
        std::cout<<"Error!!! Build tool did nothing. \n Usage: EngineBuildTool.exe [Directory1] [Namespace1] [Directory2] [Namespace2] ..."<<std::endl;
        return 1;
    }

    std::vector<std::filesystem::path> Directories;
    std::vector<std::u8string> Namespaces;
    for(int i=1;i<argc;)
    {
        Directories.push_back(argv[i]);
        i++;
        Namespaces.push_back((char8_t*)argv[i]);
        i++;
    }

    

    CBuildTool BuildTool;

    try
    {
        BuildTool.Reflect(Directories,Namespaces);
    }
    catch(const std::exception& e)
    {
        std::cout<<e.what()<<std::endl;
        return 1;
    }

    std::cout<<"Build Tool Done!"<<std::endl;

    return 0;
}